﻿using UnityEngine;
using System.Collections;
using Assets.Engine.SimpleArrow;

namespace Engine.Entities.Character
{
    [System.Serializable]
    public class SteveModel
    {
        public SteveModel(GenderEnum gender)
        {
            Skills = new Skills();

            if ( gender == GenderEnum.Undefined)
            {
                if (Random.Range(0f, 1f) < 0.5f)
                    Gender = GenderEnum.Male;
                else
                    Gender = GenderEnum.Female;
            }
            else
            {
                Gender = gender;
            }

            Name = SteveNames.NAME_UNDEFINED;

            Job = JobEnum.Unemployed;
            Exp = 0;
            HP = 0;
            Happiness = 0;
            LV = 1;
        }

        public bool IsIddle { get { return _isIdle; } set { _isIdle = value; } }
        private bool _isIdle = true;

        public Path Path { get; set; }

        public JobEnum Job { get; set; }

        public string JobName { get { return Job.ToString(); } }

        public GenderEnum Gender { get; set; }

        public string Name { get; set; }

        public string Surname { get; set; }

        public Skills Skills { get; set; }

        internal void SetName(string name, string surname)
        {
            Name = name;
            Surname = surname;
        }

        public int Exp { get; set; }

        public int HP { get; set; }

        public int Happiness { get; set; }

        public int LV { get; set; }
    }
}